Wells are generally drilled into subsurface rocks to access fluids, such as hydrocarbons, stored in subterranean formations. The formations penetrated by a well can be evaluated for various purposes, including for identifying hydrocarbon reservoirs within the formations. During drilling operations, one or more drilling tools in a drill string may be used to test or sample the formations. Following removal of the drill string, a wireline tool may also be run into the well to test or sample the formations. These drilling tools and wireline tools, as well as other wellbore tools conveyed on coiled tubing, drill pipe, casing, or other means of conveyance, are also referred to herein as “downhole tools.” Certain downhole tools may include two or more integrated collar assemblies, each for performing a separate function, and a downhole tool may be employed alone or in combination with other downhole tools in a downhole tool string.
Formation evaluation may involve drawing fluid from a formation into a downhole tool. In some instances, downhole fluid analysis is used to test the fluid while it remains in the well. Such analysis, which can be performed with sensors of downhole tools, is used to provide information on certain fluid properties in real time without the delay associated with returning fluid samples to the surface. Information obtained through downhole fluid analysis can be used as inputs to various modeling and simulation techniques to estimate the properties or behavior of fluid in a reservoir. Some downhole tools include optical spectrometers for measuring optical properties of received fluids. These optical spectrometers can include emitters and detectors of electromagnetic radiation positioned about flowlines in the tools. Optical windows can be provided in the flowlines to isolate the emitters and detectors from fluids in the flowlines, while allowing radiation to pass through the windows and the fluids.